<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>客户报表</title>
</head>
<body>
<div id="main" style="width: 600px;height:400px;"></div>
<script src="/js/plugins/echarts/echarts.common.min.js"></script>
<script type="text/javascript">
    var myChart = echarts.init(document.getElementById('main'));
    var option = {
        title : {
            text: '潜在客户报表',
            x:'center'
        },
        tooltip : {
            trigger: 'item',
            formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        legend: {
            orient : 'vertical',
            x : 'left',
            data:${groups}
        },
        calculable : true,
        series : [
            {
                name:'客户数',
                type:'pie',
                radius : '55%',
                center: ['50%', '60%'],
                data:${datas}
            }
        ]
    };
    // 为echarts对象加载数据
    myChart.setOption(option);
</script>
</body>
</html>